using System;
using System.Collections.Generic;
using System.Text;

using MyAI.NeuralNetworkLib.Specification;

namespace MyAI.NeuralNetworkLib.Implementation
{
    public class ActivationFunctionFactory : IActivationFunctionFactory
    {

        #region Vars
        private static ActivationFunctionFactory _instance = null;
        #endregion

        #region Constructor
        private ActivationFunctionFactory()
        { 
            
        }
        #endregion

        #region Instance
        public static ActivationFunctionFactory Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new ActivationFunctionFactory();
                }
                return _instance;
            }
        }
        #endregion

        #region IActivationFunctionFactory Members

        public IActivationFunction CreateActivationFunction(ActivationFunctionTypes type)
        {
            switch (type)
            { 
                case ActivationFunctionTypes.LogisticSigmoid:
                    return (IActivationFunction)(new LogisticSigmoid());
                default:
                    return (IActivationFunction)(new LogisticSigmoid());
            }
        }

        #endregion
    }
}
